home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / misc / ftree0.3.lha / ftree / src / RCS / ftree.h,v < prev    next >
Encoding:
Text File  |  1994-04-29  |  18.5 KB  |  836 lines

  1. head    1.11;
  2. access;
  3. symbols
  4.     stage1:1.8;
  5. locks; strict;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.11
  10. date    94.04.30.00.07.10;    author peteric;    state Exp;
  11. branches;
  12. next    1.10;
  13.  
  14. 1.10
  15. date    94.04.27.11.37.54;    author peteric;    state Exp;
  16. branches;
  17. next    1.9;
  18.  
  19. 1.9
  20. date    94.03.26.11.28.03;    author peteric;    state Exp;
  21. branches;
  22. next    1.8;
  23.  
  24. 1.8
  25. date    94.03.10.21.28.26;    author peteric;    state Exp;
  26. branches;
  27. next    1.7;
  28.  
  29. 1.7
  30. date    94.03.07.12.46.37;    author peteric;    state Exp;
  31. branches;
  32. next    1.6;
  33.  
  34. 1.6
  35. date    94.03.01.23.17.53;    author peteric;    state Exp;
  36. branches;
  37. next    1.5;
  38.  
  39. 1.5
  40. date    94.02.27.19.32.05;    author peteric;    state Exp;
  41. branches;
  42. next    1.4;
  43.  
  44. 1.4
  45. date    94.02.13.16.44.05;    author peteric;    state Exp;
  46. branches;
  47. next    1.3;
  48.  
  49. 1.3
  50. date    94.02.12.20.32.21;    author peteric;    state Exp;
  51. branches;
  52. next    1.2;
  53.  
  54. 1.2
  55. date    94.02.12.20.00.18;    author peteric;    state Exp;
  56. branches;
  57. next    1.1;
  58.  
  59. 1.1
  60. date    94.02.12.19.51.19;    author peteric;    state Exp;
  61. branches;
  62. next    ;
  63.  
  64.  
  65. desc
  66. @Header file for ftree
  67. @
  68.  
  69.  
  70. 1.11
  71. log
  72. @Added member datewidth to marriage structure; see print.c.
  73. @
  74. text
  75. @/*************************************************************************
  76.  *
  77.  *     $Name$
  78.  *
  79.  *    $Author: peteric $
  80.  *
  81.  *    $Date: 1994/04/27 11:37:54 $
  82.  *
  83.  *    $Revision: 1.10 $
  84.  *
  85.  *    Purpose:    Header file for ftree family tree formatter.
  86.  *            
  87.  *    $Log: ftree.h,v $
  88.  * Revision 1.10  1994/04/27  11:37:54  peteric
  89.  * changed structure to introduce lower-level pointer 'pmheader_t
  90.  * which can be used for the left/right links when marriages must
  91.  * be accounted for. Bumped up version number, added new prototypes
  92.  * and included better font support.
  93.  *
  94.  * Revision 1.9  1994/03/26  11:28:03  peteric
  95.  * new function prototypes, new enum.
  96.  *
  97.  * Revision 1.8  1994/03/10  21:28:26  peteric
  98.  * Multiple pages working!
  99.  *
  100.  * Revision 1.7  1994/03/07  12:46:37  peteric
  101.  * Passed on as first Version.
  102.  *
  103.  * Revision 1.6  1994/03/01  23:17:53  peteric
  104.  * added new function defs; upped the version number.
  105.  *
  106.  * Revision 1.5  94/02/27  19:32:05  19:32:05  peteric (Peter Ivimey-Cook)
  107.  * extended structures; added new functionality. This one
  108.  * now works!
  109.  * 
  110.  * Revision 1.4  1994/02/13  16:44:05  peteric
  111.  * added new variables to support the changes in print.c; added
  112.  * marrlines var to hold the number of lines required for a marriage.
  113.  * Deleted unused lineheight; added comments.
  114.  *
  115.  * Revision 1.3  1994/02/12  20:32:21  peteric
  116.  * changed interface to marriages to allow multiple marriages per id
  117.  *
  118.  * Revision 1.2  94/02/12  20:00:18  20:00:18  peteric (Peter Ivimey-Cook)
  119.  * added in comments etc.
  120.  * 
  121.  *    
  122.  *
  123.  *************************************************************************/
  124.  
  125. /*
  126.  * ftree.h header file.
  127.  */
  128.  
  129. #ifndef _FTREE_H
  130. #define _FTREE_H
  131.  
  132. #include <stdio.h>
  133.  
  134. #ifndef NULL
  135. #define NULL 0
  136. #endif
  137.  
  138. #define TRUE    1
  139. #define FALSE    0
  140.  
  141. #if defined(__hpux) || defined(__GNUC__)
  142. #define stricmp  strcasecmp
  143. #elif defined(amiga)
  144. #define stricmp  strcmp
  145. #endif
  146.  
  147. #define MAXLEVELS    32
  148. #define NAMELEN        64
  149. #define OCCLEN        128
  150.  
  151. #if defined(__unix)
  152. #define PROCSET_FILENAME    "./ftinit.ps"
  153. #elif defined(amiga)
  154. #define PROCSET_FILENAME    "s:ftree-init.ps"
  155. #endif
  156.  
  157. /*
  158.  * id code
  159.  */
  160. typedef long id_t;
  161.  
  162. #define NOID    0L
  163.  
  164. enum living_t
  165. {
  166.     L_LIVING,
  167.     L_DEAD,
  168.     L_UNKNOWN
  169. };
  170.  
  171. enum mhint_t
  172. {
  173.     H_CENTERED,
  174.     H_LEFT,
  175.     H_RIGHT
  176. };
  177.  
  178. enum xpspec_t
  179. {
  180.     XP_FIRST,
  181.     XP_LAST
  182. };
  183.  
  184. enum mstate_t
  185. {
  186.     M_MARRIED,
  187.     M_DIVORCED,
  188.     M_SEPARATED,
  189.     M_WIDOWED,
  190.     M_UNKNOWN
  191. };
  192.  
  193. enum sex_t
  194. {
  195.     S_MALE,
  196.     S_FEMALE,
  197.     S_UNKNOWN
  198. };
  199.  
  200. typedef struct
  201. {
  202.     char *font;            /* proper name of font */
  203.     float size;            /* size in points */
  204.     int linespc;            /* line spacing for font */
  205. } fontinfo_t;
  206.  
  207. typedef struct options
  208. {
  209.     int printoccupation;        /* flag - print occupations too? */
  210.     int printids;            /* flag - print ID codes too? */
  211.     id_t startperson;        /* ID of start person */
  212.     char *outputfile;        /* name of output file, 'con' => stdout */
  213.     int vspace;            /* diff btw two generations in points */
  214.     fontinfo_t titlefont;        /* font used for title */
  215.     float titlegreylevel;        /* grey level (0..1, 1 is white) for title box */
  216.     fontinfo_t identfont;        /* font used to draw identification details */
  217.     fontinfo_t personfont;        /* font used to draw people's names */
  218.     fontinfo_t symfont;        /* font used to draw sumbols */
  219.     fontinfo_t datefont;        /* font used to draw sumbols */
  220.     char *titlestr;            /* title of drawing */
  221.     int ticklen;            /* length of tick drawn from child line to child */
  222.     int tree_gap;            /* minimum column between people */
  223.     float afmconst;            /* width constant if no AFM file */
  224.     int maxlevel;            /* maximum number of levels (generations) to print */
  225.     int pagewidth;            /* 'width' of page - x dimension */
  226.     int pageheight;            /* 'height' of page - y dimension */
  227.     int rmargin, bmargin;        /* bottom,right paper margins */
  228.     int lmargin, tmargin;        /* left, top paper margins */
  229.     char *papertype;        /* name of paper size - e.g. a4 */
  230.     int landscape;            /* flag - in landscape mode? */
  231.     int marrlines;            /* number of lines per marriage */
  232.     int bblx, bbux;            /* bounding box x */
  233.     int bbly, bbuy;            /* bounding box y */
  234.     int multipage;            /* true when code does multple showpages */
  235. } options_t;
  236.  
  237. typedef struct papersize
  238. {
  239.     char *str;            /* paper type name (case sensitive) */
  240.     int xsz;            /* x size in points */
  241.     int ysz;            /* y size in points */
  242. } papersize_t;
  243.  
  244. typedef struct date
  245. {
  246.     unsigned int known:1;        /* date known at all? */
  247.     unsigned int dvalid:1;        /* day known */
  248.     unsigned int mvalid:1;        /* month known */
  249.     unsigned int yvalid:1;        /* year known */
  250.     short day;            /* day of month */
  251.     short month;            /* month of year 1..12 */
  252.     int year;            /* year (0..99 => 1900..1999) */
  253. } date_t;
  254.  
  255. enum htype_t
  256. {
  257.     HT_PERSON, HT_MARRIAGE
  258. };
  259.  
  260. /*
  261.  * person/marriage HEADER structure. Not valid on it's own.
  262.  */
  263. typedef struct pmheader
  264. {
  265.     enum htype_t type;
  266.     struct pmheader *left, *right;    /* people left & right on line */
  267.     int xpos, ypos;
  268.     int width;
  269.     int level;
  270. } pmheader_t;
  271.  
  272. typedef struct person
  273. {
  274.     pmheader_t h;
  275.     struct person *nextperson;    /* next person */
  276.     struct marriage *parents;    /* pointer to parent's marriage record */
  277.     struct person *nextchild;    /* next (younger, right) child of parents */
  278.     struct person *lastchild;    /* last (older, left) child of parents */
  279.     char firstname[NAMELEN];    /* own name */
  280.     char family[NAMELEN];        /* family name */
  281.     char occupation[OCCLEN];    /* occupation */
  282.     id_t id;            /* assigned ID */
  283.     enum living_t living;        /* living/dead/unknown */
  284.     enum sex_t sex;            /* male/female/unknown */
  285.     int married;            /* true if married */
  286.     struct marriage *firstmarriage;    /* first marriage or NULL */
  287.     struct marriage *lastmarriage;    /* last marriage in list or NULL */
  288.     int fullname;            /* true if full name printed */
  289.     date_t born;            /* date person was born */
  290.     date_t bapt;            /* date person was baptised */
  291.     date_t died;            /* date person died */
  292. } person_t;
  293.  
  294. typedef struct marriage
  295. {
  296.     pmheader_t h;
  297.     struct marriage *nextmarriage;    /* next marriage in global list */
  298.     struct marriage *next;        /* next marriage in person list */
  299.     struct marriage *prev;        /* previous marriage in person list */
  300.     person_t *husband;        /* husband in marriage */
  301.     person_t *wife;            /* wife in marriage */
  302.     struct marriage *backlink;    /* marriage we printed to get here */
  303.     person_t *firstchild;        /* pointer to first child of marriage */
  304.     person_t *lastchild;        /* pointer to last child of marriage */
  305.     date_t when;            /* when married */
  306.     enum mstate_t state;        /* divorced etc. */
  307.     enum mhint_t hint;        /* should center when printing ? */
  308.     char *chartref;            /* secondary chart reference string */
  309.     int children;            /* number of children */
  310.     int legal;            /* if true marriage 'proper' */
  311.     int datewidth;            /* width of a date line */
  312. } marriage_t;
  313.  
  314. typedef struct
  315. {
  316.     pmheader_t *first, *last;        /* people on this level (d-linked list) */
  317. } level_t;
  318.  
  319. /********************************************************************************/
  320.  
  321. #ifdef DEBUG
  322. #define dbprintf(stuff)            _dprintf stuff
  323. #define dbprintf_note(stuff)    _dprintf stuff ; printf stuff
  324. #else
  325. #define dbprintf(stuff)
  326. #define dbprintf_note(stuff)
  327. #endif
  328.  
  329. #define VERSION    "0.3"
  330. #define INCH    72
  331.  
  332. #define XOF(opts, x)    (x)
  333. #define YOF(opts, y)    ((opts->pageheight-(opts->bmargin+opts->tmargin))-(y))
  334.  
  335. #define DXOF(opts, x)    (x)
  336. #define DYOF(opts, y)    (-(y))
  337.  
  338. #define streq(str1, str2)    (strcmp(str1, str2) == 0)
  339.  
  340. #define idcmp(id1, id2)        (id1 == id2)
  341.  
  342. /********************************************************************************/
  343.  
  344. void usage();
  345. void parse(FILE *fp, char *filename);
  346. void yyerror(char *str);
  347. void print(options_t *opts);
  348. void makeperson(person_t *person);
  349. marriage_t *makemarriage(marriage_t *prev,id_t husb, id_t wife, date_t when, enum mstate_t state,
  350.         enum mhint_t hint, person_t *first_child, person_t *last_child);
  351. marriage_t *findfirstmarriage(id_t id);
  352. marriage_t *findmarriage2(id_t hid, id_t wid);
  353. person_t *findperson(id_t id);
  354. void add_child(id_t id);
  355. void setpapertype(options_t *opts);
  356. void printperson(FILE *outf, options_t *opts, person_t *person, int x, int y);
  357. void printmarriage(FILE *outf, options_t *opts, marriage_t *marriage, int x, int y);
  358. void do_title(FILE *outf, options_t *opts, marriage_t *marriage);
  359. void do_prolog(FILE *outf, options_t *opts);
  360. void do_epilog(FILE *outf, options_t *opts);
  361. void do_simple_layout(options_t *opts, marriage_t *marriage, int x, int y, int level);
  362. void print_tree(FILE *outf, options_t *opts, marriage_t *marriage);
  363. char *date2string(struct date *d);
  364. int widthof(options_t *options, person_t *pers);
  365. int widthofmarriage(options_t *options, marriage_t *m);
  366. void move_tree(person_t *person, int dx);
  367. void clear_date(date_t *date);
  368. id_t makeid(person_t *p);
  369. id_t cvid(const char *str);
  370. void errmsg(const char *str, ...);
  371. void warnmsg(const char *str, ...);
  372. void usage(void);
  373. int xposof(pmheader_t *p, enum xpspec_t spec);
  374. int pwidthof(pmheader_t *p, enum xpspec_t spec);
  375. void datefmt(char *buf, struct date *b, struct date *d);
  376. void setmarriagewidths(options_t *opts, marriage_t *mroot);
  377. void setpersonwidths(options_t *opts, person_t *proot);
  378.  
  379. int yyparse(void);
  380. int yylex(void);
  381. void yyrestart(FILE*);
  382.  
  383. int loadfont(fontinfo_t *font);
  384. void unloadfont(fontinfo_t *font);
  385. double stringwidth(fontinfo_t *font, double afmconst, char *string);
  386.  
  387. #ifndef EXTERN
  388. #define EXTERN extern
  389. #endif
  390.  
  391. #ifdef DEBUG
  392. void _dprintf(char *str, ...);
  393. EXTERN int debug;
  394. #endif
  395.  
  396. EXTERN int verbose;            /* verbose mode */
  397. EXTERN person_t *proot;            /* root of person list using nextperson */
  398. EXTERN marriage_t *mroot;        /* root of marriage list using nextmarriage */
  399. EXTERN options_t *glob_opts;        /* global pointer to options within parse() */
  400. EXTERN char *psfontpath;
  401. EXTERN level_t generation[MAXLEVELS];    /* level pointers */
  402. EXTERN int nlevels;            /* # levels used */
  403.  
  404. /* these defined in errs.c */
  405. extern int reading_file;        /* true when reading input file */
  406. extern int errors;            /* # errors so far */
  407. extern char *current_filename;        /* current filename pointer */
  408. extern int lineno;            /* current linenumber */
  409.  
  410. #endif
  411. @
  412.  
  413.  
  414. 1.10
  415. log
  416. @changed structure to introduce lower-level pointer 'pmheader_t
  417. which can be used for the left/right links when marriages must
  418. be accounted for. Bumped up version number, added new prototypes
  419. and included better font support.
  420. @
  421. text
  422. @d7 1
  423. a7 1
  424.  *    $Date: 1994/03/26 11:28:03 $
  425. d9 1
  426. a9 1
  427.  *    $Revision: 1.9 $
  428. d14 6
  429. d237 1
  430. @
  431.  
  432.  
  433. 1.9
  434. log
  435. @new function prototypes, new enum.
  436. @
  437. text
  438. @d7 1
  439. a7 1
  440.  *    $Date: 1994/03/10 21:28:26 $
  441. d9 1
  442. a9 1
  443.  *    $Revision: 1.8 $
  444. d14 3
  445. d175 17
  446. d194 1
  447. a195 2
  448.     struct person *mparent;        /* linked to mother's person node if known */
  449.     struct person *fparent;        /* linked to father's person node if known */
  450. a198 1
  451.     struct person *left, *right;    /* people left & right on line */
  452. a204 1
  453.     int level;            /* level - generations from start */
  454. a208 1
  455.     int width;            /* value of widthof() */
  456. a211 1
  457.     int xpos, ypos;            /* location of top centre when printed */
  458. d216 1
  459. d223 2
  460. a227 2
  461.     person_t *firstchild;        /* pointer to first child of marriage */
  462.     person_t *lastchild;        /* pointer to last child of marriage */
  463. a229 1
  464.     int level;            /* level - generations from start */
  465. a230 2
  466.     int xpos, ypos;            /* location of centre when printed */
  467.     int width;            /* required size */
  468. d233 1
  469. a233 1
  470. typedef struct level
  471. d235 1
  472. a235 1
  473.     person_t *first, *last;        /* people on this level (d-linked list) */
  474. d241 2
  475. a242 1
  476. #define dbprintf(stuff)        _dprintf stuff
  477. d245 1
  478. d248 1
  479. a248 1
  480. #define VERSION    "0.2"
  481. a280 1
  482. void adjust_layout(FILE *outf, options_t *opts);
  483. d292 2
  484. a293 2
  485. int xposof(person_t *p, enum xpspec_t spec);
  486. int pwidthof(person_t *p, enum xpspec_t spec);
  487. d295 2
  488. d319 5
  489. a327 3
  490.  
  491. EXTERN level_t generation[MAXLEVELS];    /* level pointers */
  492. EXTERN int nlevels;            /* # levels used */
  493. @
  494.  
  495.  
  496. 1.8
  497. log
  498. @Multiple pages working!
  499. @
  500. text
  501. @d7 1
  502. a7 1
  503.  *    $Date: 1994/03/07 12:46:37 $
  504. d9 1
  505. a9 1
  506.  *    $Revision: 1.7 $
  507. d14 3
  508. d71 1
  509. a71 1
  510. #define PROCSET_FILENAME    "S:ftinit.ps"
  511. d95 6
  512. d190 1
  513. d203 1
  514. d217 1
  515. a217 1
  516.     int width, height;        /* required size */
  517. d255 1
  518. a255 1
  519. marriage_t *findmarriage1(id_t id);
  520. a256 1
  521. marriage_t *nextmarriage(marriage_t *m, id_t id);
  522. d262 1
  523. a262 1
  524. void do_title(FILE *outf, options_t *opts);
  525. d265 3
  526. a267 3
  527. void do_simple_layout(options_t *opts, id_t id, int x, int y, int level);
  528. void adjust_layout(FILE *outf, options_t *opts, id_t id);
  529. void print_tree(FILE *outf, options_t *opts, id_t marriage);
  530. d270 1
  531. d278 3
  532. a280 4
  533. person_t *findleftat(marriage_t *, int);
  534. person_t *findrightat(marriage_t *, int);
  535. int xposof(person_t *p);
  536. int yposof(person_t *p);
  537. d286 4
  538. d303 4
  539. a306 4
  540. EXTERN int reading_file;        /* true when reading input file */
  541. EXTERN int errors;            /* # errors so far */
  542. EXTERN char *current_filename;        /* current filename pointer */
  543. EXTERN int lineno;            /* current linenumber */
  544. @
  545.  
  546.  
  547. 1.7
  548. log
  549. @Passed on as first Version.
  550. @
  551. text
  552. @d7 1
  553. a7 1
  554.  *    $Date: 1994/03/01 23:17:53 $
  555. d9 1
  556. a9 1
  557.  *    $Revision: 1.6 $
  558. d14 3
  559. d65 6
  560. d96 2
  561. a97 1
  562.     M_SEPERATED,
  563. d130 2
  564. d142 1
  565. d201 1
  566. @
  567.  
  568.  
  569. 1.6
  570. log
  571. @added new function defs; upped the version number.
  572. @
  573. text
  574. @d7 1
  575. a7 1
  576.  *    $Date: 94/02/27 19:32:05 $
  577. d9 1
  578. a9 1
  579.  *    $Revision: 1.5 $
  580. d13 4
  581. a16 1
  582.  *    $Log:    ftree.h,v $
  583. d228 1
  584. a228 1
  585. void makemarriage(marriage_t *prev,id_t husb, id_t wife, date_t when, enum mstate_t state,
  586. @
  587.  
  588.  
  589. 1.5
  590. log
  591. @extended structures; added new functionality. This one
  592. now works!
  593. @
  594. text
  595. @d7 1
  596. a7 1
  597.  *    $Date: 1994/02/13 16:44:05 $
  598. d9 1
  599. a9 1
  600.  *    $Revision: 1.4 $
  601. d13 5
  602. a17 1
  603.  *    $Log: ftree.h,v $
  604. d205 1
  605. a205 1
  606. #define VERSION    "0.1"
  607. d239 1
  608. a239 1
  609. void adjust_layout(options_t *opts, id_t id);
  610. d252 2
  611. @
  612.  
  613.  
  614. 1.4
  615. log
  616. @added new variables to support the changes in print.c; added
  617. marrlines var to hold the number of lines required for a marriage.
  618. Deleted unused lineheight; added comments.
  619. @
  620. text
  621. @d7 1
  622. a7 1
  623.  *    $Date: 1994/02/12 20:32:21 $
  624. d9 1
  625. a9 1
  626.  *    $Revision: 1.3 $
  627. d14 5
  628. d45 1
  629. a45 1
  630. #ifdef __hpux
  631. d47 1
  632. a47 3
  633. #endif
  634.  
  635. #if defined(amiga) && !defined(__GNUC__)
  636. d51 11
  637. d69 7
  638. d93 3
  639. a95 3
  640.     char *font;
  641.     float size;
  642.     int linespc;
  643. d100 23
  644. a122 21
  645.     int printoccupation;    /* flag - print occupations too? */
  646.     int printids;        /* flag - print ID codes too? */
  647.     char *startperson;    /* ID of start person */
  648.     char *outputfile;    /* name of output file, 'con' => stdout */
  649.     int vspace;        /* diff btw two generations in points */
  650.     fontinfo_t title;    /* font used for title */
  651.     float titlegreylevel;    /* grey level (0..1, 1 is white) for title box */
  652.     fontinfo_t ident;    /* font used to draw identification details */
  653.     fontinfo_t person;    /* font used to draw people's names */
  654.     char *titlestr;        /* title of drawing */
  655.     int ticklen;        /* length of tick drawn from child line to child */
  656.     int maxlevel;        /* maximum number of levels (generations) to print */
  657.     int pagewidth;        /* 'width' of page - x dimension */
  658.     int pageheight;        /* 'height' of page - y dimension */
  659.     int rmargin, bmargin;    /* bottom,right paper margins */
  660.     int lmargin, tmargin;    /* left, top paper margins */
  661.     char *papertype;    /* name of paper size - e.g. a4 */
  662.     int landscape;        /* flag - in landscape mode? */
  663.     int marrlines;        /* number of lines per marriage */
  664.     int bblx, bbux;        /* bounding box x */
  665.     int bbly, bbuy;        /* bounding box y */
  666. d127 3
  667. a129 3
  668.     char *str;
  669.     int xsz;        /* x size in points */
  670.     int ysz;        /* y size in points */
  671. d134 7
  672. a140 7
  673.     unsigned int known:1;
  674.     unsigned int dvalid:1;
  675.     unsigned int mvalid:1;
  676.     unsigned int yvalid:1;
  677.     short day;
  678.     short month;
  679.     int year;
  680. a142 7
  681. typedef struct level
  682. {
  683.     struct level *up, *down;
  684.     int level;
  685.     
  686. } level_t;
  687.  
  688. d146 16
  689. a161 10
  690.     struct person *mparent;        /* links toparents */
  691.     struct person *fparent;        /* links toparents */
  692.     struct person *nextchild;    /* next child of parents */
  693.     char firstname[64];
  694.     char family[64];
  695.     char id[96];
  696.     enum living_t living;
  697.     enum sex_t sex;
  698.     int married;
  699.     int fullname;
  700. d163 4
  701. a166 5
  702.     date_t born;
  703.     date_t bapt;
  704.     date_t died;
  705.     int xpos, ypos;            /* location of centre when printed */
  706.     char occupation[128];
  707. d171 2
  708. a172 1
  709.     struct marriage *next;        /* next marriage */
  710. d174 9
  711. a182 7
  712.     person_t *wife;        /* wife in marriage */
  713.     date_t when;        /* when married */
  714.     enum mstate_t state;
  715.     person_t *firstchild;    /* pointer to first child in list */
  716.     person_t *lastchild;    /* pointer to last child in list */
  717.     int children;
  718.     int level;
  719. d184 2
  720. a185 2
  721.     int xpos, ypos;        /* location of centre when printed */
  722.     int width, height;    /* required size */
  723. d188 5
  724. d201 1
  725. a201 1
  726. #define VERSION    "1.0"
  727. d205 1
  728. a205 1
  729. #define YOF(opts, y)    ((opts->pageheight - (opts->bmargin+opts->tmargin)) - (y))
  730. d212 2
  731. d221 7
  732. a227 6
  733. void makemarriage(char *husb, char *wife, date_t when, enum mstate_t state,
  734.         person_t *first_child, person_t *last_child);
  735. marriage_t *findmarriage(char*id);
  736. marriage_t *nextmarriage(marriage_t *m, char *id);
  737. person_t *findperson(char*id);
  738. void add_child(char *str);
  739. d234 3
  740. a236 3
  741. void do_simple_layout(options_t *opts, char *id, int x, int y, int level);
  742. void adjust_layout(options_t *opts, char *id);
  743. void print_tree(FILE *outf, options_t *opts, char *marriage);
  744. d239 1
  745. a239 1
  746. void move_tree(marriage_t *marriage, int dx);
  747. d241 7
  748. d249 4
  749. d262 8
  750. a269 4
  751. EXTERN int verbose;
  752. EXTERN person_t *proot;
  753. EXTERN marriage_t *mroot;
  754. EXTERN options_t *glob_opts;
  755. d271 2
  756. a272 2
  757. extern char *current_filename;
  758. extern int lineno;
  759. @
  760.  
  761.  
  762. 1.3
  763. log
  764. @changed interface to marriages to allow multiple marriages per id
  765. @
  766. text
  767. @d7 1
  768. a7 1
  769.  *    $Date: 94/02/12 20:00:18 $
  770. d9 1
  771. a9 1
  772.  *    $Revision: 1.2 $
  773. d13 4
  774. a16 1
  775.  *    $Log:    ftree.h,v $
  776. d79 19
  777. a97 17
  778.     int printoccupation;
  779.     int printids;
  780.     char *startperson;
  781.     char *outputfile;
  782.     int vspace;            /* diff btw two generations in points */
  783.     int lineheight;
  784.     fontinfo_t title;
  785.     fontinfo_t ident;
  786.     fontinfo_t person;
  787.     char *titlestr;
  788.     int maxlevel;
  789.     int pagewidth;
  790.     int pageheight;
  791.     int rmargin, bmargin;
  792.     int lmargin, tmargin;
  793.     char *papertype;
  794.     int landscape;
  795. a99 1
  796.     int ticklen;
  797. d172 1
  798. @
  799.  
  800.  
  801. 1.2
  802. log
  803. @added in comments etc.
  804. @
  805. text
  806. @d5 1
  807. a5 1
  808.  *    $Author$
  809. d7 1
  810. a7 1
  811.  *    $Date$
  812. d9 1
  813. a9 1
  814.  *    $Revision$
  815. d13 4
  816. a16 1
  817.  *    $Log$
  818. d188 1
  819. d197 3
  820. a199 3
  821. void do_simple_layout(options_t *opts, marriage_t *marriage, int x, int y, int level);
  822. void adjust_layout(options_t *opts, marriage_t *marriage);
  823. void print_tree(FILE *outf, options_t *opts, marriage_t *marriage);
  824. a202 1
  825. void adjust_layout(options_t *opts, marriage_t *marriage);
  826. @
  827.  
  828.  
  829. 1.1
  830. log
  831. @Initial revision
  832. @
  833. text
  834. @d1 17
  835. @
  836.